<?php

/**
 * @Author: king
 * @Date:   2019-05-04 19:07:19
 * @Last Modified by:   king
 * @Last Modified time: 2019-05-12 11:54:21
 */
<?php
/**
 * Created by PhpStorm.
 * User: krystal
 * Date: 2019/4/9
 * Time: 11:38
 */

namespace App\Models\Api;
use App\Exceptions\ApiException;
use App\Models\Api\Base;
use Cache;

/**
 * 保存订单数据
 * Class LanmeiOrderGoods
 * @package app\common\model
 */
class LanmeiOrderGoods extends Base
{
    protected $table = 'astro_order_goods';

    public function saveOrder($map = [])
    {
        try {
            $this->insert($map);
        } catch (\Exception $e) {
           throw new ApiException('订单入库失败', config('code.error'));
        }

        return true;
    }

}
